<template>
<div 
    class="item_cp"
    :style="{
        backgroundColor:'#e3e3e3',
    }">
    <div>
        {{itemData.account}}
    </div>
    <van-button 
        type="info"
        size="small"
        @click="toPage">
        查询验证码
    </van-button>
</div>
</template>

<script>
//数据个体组件
export default {
    props:{
        itemData:{
            type: Object,
            default: () => {
                return {};
            },
        },
        customerName:{
            type:String,
            default:'',
        },
        index:{  //索引位置
            type:Number,
            default:0,
        },
    },
    data() {
        return {
        };
    },
    methods: {
        toPage(){  //跳转到查询验证码页面
            this.$router.push(
                { 
                    name: 'FindData', 
                    params: {
                        customerId: this.itemData.customerId,
                        userId:this.itemData.userId,
                        leaderPhone: this.itemData.leaderPhone,
                        account:this.itemData.account,
                        customerName:this.customerName,
                    },
                },
            );
        }
    }
}
</script>

<style scoped lang="scss">
.item_cp{
    background-color: white;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    >div{
        font-size: 17px;
    }
}
</style>
